<?php
namespace backend\models\activeRecords;

use Yii;
use yii\db\ActiveRecord;

/**
 * This is the model class for table "{{%guild_bank}}".
 *
 * @property string $id 自增id
 * @property string $bank_branch 银行支行
 * @property string $bank_user 银行卡户主
 * @property string $bank_card 银行卡号
 * @property string $bank_guild 银行卡所属公会
 */
class GuildBank extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%guild_bank}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['bank_branch', 'bank_user', 'bank_card'], 'required'],
            [['bank_branch', 'bank_card', 'bank_guild'], 'string', 'max' => 255],
            [['bank_user'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', '自增id'),
            'bank_branch' => Yii::t('app', '银行支行'),
            'bank_user' => Yii::t('app', '银行卡户主'),
            'bank_card' => Yii::t('app', '银行卡号'),
            'bank_guild' => Yii::t('app', '银行卡所属公会'),
        ];
    }
}
